Repository navigation
Conversation
c3e3121 to
3be4832
Compare
3be4832 to
7cb677e
Compare
586debd to
22536cd
Compare
| Retain, | ||
|
|
||
| /// Delete the resource in the product. | ||
| Delete, |
There was a problem hiding this comment.
Question regarding a specific scenario: I guess it would be possible for someone to create a KafkaTopic object with a Kafka topic they theoretically shouldn't have permissions for and then just delete that object, in turn deleting that Kafka topic in the cluster. Would that be covered with authorization somehow? That scenario would be relevant for different user groups managing different topics in the same cluster but I think Kafka has also some system topics?
There was a problem hiding this comment.
In general I believe this is always a security risk with declarative resources in products.
For me the most important defense is definitely k8s RBAC on the KafkaCluster CRD preventing unauthorized users from taking creating KafkaTopics with arbitrary names. Also the principle used by the agent inside Kafka should have limitations on what it can and can't do.
Specifically for Kafka I'm also considering adding a validation on the topic name rejecting the prefix __ which is used by some internal topics.
There was a problem hiding this comment.
If we have a topic per cluster, we could store the topic ID in the cluster resource? Only if these match (or is set) we know it is managed by us?
For the internal topics: We explicitly offer naming the topic different from the custom resource name. Why is that? E.g. with Trino catalogs, the name is the one of the resource (with options to tweak).
https://docs.stackable.tech/home/stable/trino/usage-guide/catalogs/#_catalog_name_tweaking
|
Claude noted down some possible lifecycle problems/decisions:
Not sure if this is part of this PR or not, but it seemed general enough to mention it in the operator-rs changes, if this provides some mechanism for all the operators. |
Yes, the idea is to have the operator clean up after a KafkaCluster (or the whole Namespace) has been deleted and there is no agent left to clean up finalizers. As the cluster is being deleted anyway the operator only has to remove finalizers and doesn't need to take action in Kafka. For me this logic is a candidate to extract into |
| Retain, | ||
|
|
||
| /// Delete the resource in the product. | ||
| Delete, |
There was a problem hiding this comment.
If we have a topic per cluster, we could store the topic ID in the cluster resource? Only if these match (or is set) we know it is managed by us?
For the internal topics: We explicitly offer naming the topic different from the custom resource name. Why is that? E.g. with Trino catalogs, the name is the one of the resource (with options to tweak).
https://docs.stackable.tech/home/stable/trino/usage-guide/catalogs/#_catalog_name_tweaking
Description
Part of stackabletech/issues#888.
Adds shared utilities required for stackabletech/kafka-operator#1028.
Depends on https://github.com/stackabletech/decisions/issues/98 and https://github.com/stackabletech/decisions/issues/99.
Definition of Done Checklist
Author
Reviewer
Acceptance